package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.sta.StaItemDictDto;
import com.ysd.lis.dto.sta.StaItemDictParam;
import com.ysd.lis.entity.sta.StaItemDict;
import com.ysd.lis.service.sta.StaItemDictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-12-18
 */
@Api(tags = "标准功能")
@RestController
@RequestMapping("/lis/sta/staItemDict")
public class StaItemDictController extends BaseController {

    @Autowired
    StaItemDictService staItemDictService;

    @ApiOperation("不分页查询")
    @GetMapping("/findStaItemDictList")
    public Result findStaItemDictList(StaItemDictParam param){
        return staItemDictService.findStaItemDictList(param);
    }

    @ApiOperation("不分页查询")
    @GetMapping("/findStaItemDictPageList")
    public Result findStaItemDictPageList(StaItemDictParam param){
        return staItemDictService.findStaItemDictPageList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addStaItemDict")
    public Result addStaItemDict(@RequestBody StaItemDict staItemDict){
        return  staItemDictService.addStaItemDict(staItemDict);
    }

    @ApiOperation("修改")
    @PostMapping("/editStaItemDict")
    public Result editStaItemDict(@RequestBody StaItemDict supplier) {
        return staItemDictService.editStaItemDict(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteStaItemDictList")
    public Result batchDeleteStaItemDictList(@RequestBody StaItemDictDto dto){
        return  staItemDictService.batchDeleteStaItemDictList(dto);
    }

}
